package com.shtel.bss.saas.tenant.service;

import com.github.pagehelper.PageInfo;
import com.shtel.bss.saas.core.data.common.service.IDataService;
import com.shtel.bss.saas.tenant.bo.SysGlobalAuthBo;
import com.shtel.bss.saas.tenant.bo.QrySysGlobalAuthResBo;
import com.shtel.bss.saas.tenant.bo.SysTenantBo;

import java.util.List;


/**
 * 基础权限表服务
 * @author xiezhiwei 2020-02-05 22:02
 */
public interface ISysGlobalAuthService extends IDataService {
    /**
     * 查询权限列表
     * @param authName
     * @param authCode
     * @param pageSize
     * @param pageNum
     * @return
     */
    PageInfo<QrySysGlobalAuthResBo> querySysGlobalAuthList(String authName, String authCode, int pageSize, int pageNum );

    void saveSysGlobalAuth(SysGlobalAuthBo sysGlobalAuthBo);

    void updateSysGlobalAuth(SysGlobalAuthBo sysGlobalAuthBo);

    void removeSysGlobalAuth(List<Long> authIds);

    /**
     * 权限授予租户
     * @param authId
     * @param tenantIds
     * @return
     */
    void updateAuthTenant(Long authId, List<Long> tenantIds);

    /**
     * 根据权限类型查询权限
     * @return
     */
    List<QrySysGlobalAuthResBo> querySysGlobalAuthList(Byte authType);

    /**
     * 查询权限
     * @return
     */
    List<QrySysGlobalAuthResBo> querySysGlobalAuthList();

    PageInfo<SysTenantBo> querySysTenantnotGrantedAuthId(Long authId,int pageSize,int pageNum);

    PageInfo<SysTenantBo> querySysTenantGrantAuthId(Long authId,int pageSize,int pageNum);

}
